package com.lening.collect.controller;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lening.collect.dto.PledgeDTO;
import com.lening.collect.pojo.Pledge;
import com.lening.collect.service.IPledgeService;
import com.lening.collect.vo.PledgeVo;
import com.lening.common.base.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 杨军
 * @since 2024-05-31
 */
@RestController
@RequestMapping("/pledge")
public class PledgeController extends BaseController<Pledge, PledgeDTO, IPledgeService> {
    @Autowired
    private IPledgeService service;
    //根据状态查询
    @GetMapping("/getByStatusPage")
    public Page<PledgeVo> getByStatusPage(PledgeDTO pledgeDTO) {
        return service.getByStatusPage(pledgeDTO);
    }

    //退还押金
    @PutMapping("/updateStatusPayInt")
    public void updateStatusPayInt(Long id){
        service.updateStatusPayInt(id);
    }

}
